package com.drcoffee.drcoffeemall.feign;

import com.drcoffee.drcoffeemall.entry.erp.ErpOCC;
import com.drcoffee.drcoffeemall.entry.ocm.HbaOCM;
import com.drcoffee.drcoffeemall.entry.ocm.PartInOCM;
import org.apache.ibatis.annotations.Param;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

//@FeignClient(name = "provider-service", url = "http://localhost:8888")
@FeignClient(name = "provider-service", url = "http://localhost:8889")
public interface OcmProviderClient {
    @GetMapping("/ocm/feignTest")
    String feignTest();


    @PostMapping("/ocm/insertOcmOrder")
    Map<String,Object> insertOcmOrder(Map<String, Object> paramMapToOcm);

    @PostMapping("/ocm/getCag")
    Map<String, Object> getCag(Map<String, Object> paramMap);

    @PostMapping("/ocm/getDan")
    Map<String, Object> getDan(Map<String, Object> paramMapDan);


    @PostMapping("/ocm/checkErpCode")
    Map<String, Object> checkErpCode(Map<String, Object> paramMap);


    @PostMapping("/ocm/insert")
    int insert(@RequestBody ErpOCC erpOCC);

    @PostMapping("/ocm/allOCM")
    ArrayList<HbaOCM> allOCM();

    @GetMapping("/ocm/del")
    int del();

    @PostMapping("/ocm/insertHBA")
    int insertHBA(@RequestBody HbaOCM habOCM);

}
